package fudan.se.lab2.repository;

import fudan.se.lab2.domain.Distribution;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface DistributionRepository extends CrudRepository<Distribution, Long> {
    Iterable<Distribution> findByUsername(String username);

    Iterable<Distribution> findByMeetingFullName(String meetingFullName);

    Iterable<Distribution> findByFileTitleAndMeetingFullName(String fileTitle, String meetingFullName);

    Iterable<Distribution> findByUsernameAndStatus(String username, int status);

    Distribution findByFileTitleAndMeetingFullNameAndUsername(String fileTitle, String meetingFullName, String username);

}
